package com.zhangyan.service;

import com.zhangyan.entity.Dept;
import com.zhangyan.dao.DeptMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {

    @Autowired
    private DeptMapper deptMapper;

    @Override
    public int insertDept(Dept dept) {
        return deptMapper.insertDept(dept);
    }

    @Override
    public int deleteDept(Integer deptId) {
        return deptMapper.deleteDept(deptId);
    }

    @Override
    public int updateDept(Dept dept) {
        return deptMapper.updateDept(dept);
    }

    @Override
    public List<Dept> queryDept(String dname, String loc) {
        return deptMapper.queryDept(dname, loc);
    }
}
